%{
  open Algo;;
  
  (* current path *)
  let path = ref "/";;

  let col = ref 0;;

%}

%token Leof
%token Leol
%token <string> Lpath
%token <int> LContainerId
%token <string> LContainerInfo
%token <Algo.info> LInfo

%start policies
%type <(Algo.container * Algo.ptag) list> policies

%%

policies :
| Leof
    {
      []
    }
| Lpath Leol policies
	{
	  $3
	}
| line policies
	{
	  (* print_string "line policies"; *)
	  $1::$2
	}

line :
| LContainerId LContainerInfo policy
    {
      (* print_string "Ligne"; *)
      (Persistent_container($2), [$3])
    }

policy :
| Leol
    {
      []
    }
| LInfo policy
	{
	  $1::$2
	}
